feat: support binary format. - #772
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df8dc91cdb
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| let mut index = 0; | ||
| while index < buffer.len() { | ||
| match buffer[index] { | ||
| b',' | b']' | b')' | b'}' | b' ' | b'\t' | b'\r' | b'\n' => break, |
There was a problem hiding this comment.
Stop binary token parsing at map key separator
When binary_output_format is base64 or utf-8, collect_binary_token is used for nested Binary values, but its delimiter list does not include :. In read_map, keys are parsed first and then a colon is expected; with input like {eHl6:1} the key parser will consume past : into the value, which then triggers a decode error or a later must_ignore_byte(':') failure. This breaks decoding for Map<Binary, ...> values in JSON results when keys are unquoted.
Useful? React with 👍 / 👎.
|
Review result: closing this PR. Reason: This PR has remained a draft for a long time, is currently behind main, and still has an unresolved parsing issue: when binary_output_format is base64 or utf-8, a nested Binary value used as a Map key (for example, {eHl6:1}) can cause the token parser to consume the value because : is not treated as a delimiter, resulting in a decoding failure. The existing tests cover top-level values, arrays, and tuples, but not Map<Binary, ...>. If this feature is still needed, please create a new PR based on the current main branch, add coverage for Map keys and nested types, and fix the token boundary and error handling first. Thanks for the contribution. |
No description provided.